/**
 * @author Alex Wijnbeek
 * Row item for StatusListView
 */
package nl.nhl.idp.Views.StatusView;

public class ListViewItem
{
	private String name;
	private String value;
	private String unit;
	
	public String GetName(){return name;}
	
	public String GetValue(){return value;}
	public void SetValue(Object value)
	{
		if(value != null)
			this.value = value.toString();
	}
	
	public String GetUnit(){return unit;}
	
	/**
	 * Creates a new ListViewItem
	 * @param name The item's name
	 * @param value The item's value
	 */
	public ListViewItem(String name, Object value)
	{
		this(name, value, "");
	}
	
	/**
	 * Creates a new ListViewItem
	 * @param name The item's name
	 * @param value The item's value
	 * @param unit The unit of the item's value
	 */
	public ListViewItem(String name, Object value, String unit)
	{
		if(name != null)
			this.name = name;
		if(value != null)
			this.value = value.toString();
		if(unit != null)
			this.unit = unit;
	}
}